#pragma once

#include "Point.h"

// abstract base object
class BaseObject
{
protected:
	int		AssetIndex;
	bool	m_bActive;			//Determining weather to update the GUI
	
	point	m_location;								// two-dimensional location in world space
	point	m_rotate;								// two-dimensional rotate
	point	m_scale;								// two-dimensional Scale
public:
	
	BaseObject() : AssetIndex(-1),
		m_scale(1,1)
	{}
	BaseObject(point loc)
		: m_location(loc),
		m_scale(1,1)
	{}

	BaseObject(point loc, int assetindex)
		: m_location(loc)
		, AssetIndex(assetindex)
		, m_scale(1,1)
	{}
	

	void			Init(point loc){
		m_location = loc;
	}

	inline void		setLoc(point P) {m_location = P;}
	inline point	getLoc() {return m_location; }

	inline void		setRot(point R) {m_rotate = R;}
	inline point	getRot() {return m_rotate; }

	inline void		setScale(point P) {m_scale = P;}
	inline point	getScale() {return m_scale; }

	inline bool		isActive() { return m_bActive; }

	inline void		SetAssetIndex(int i ){AssetIndex = i;}
	inline int		GetAssetIndex() { return AssetIndex;}


	/** will allow future objects with a destructor to destruct correctly */
	virtual ~BaseObject(){}

	/** @param a_ms the number of milliseconds passed since the last time update was called */
	virtual void update(int a_ms){}

	virtual void collideWith(BaseObject * obj){}
};